<template>
  <div class="app">
    <h1>我是App组件（祖），{{name}}---{{price}}</h1>
    <Child></Child>
  </div>
</template>

<script>
import {reactive, toRefs,provide} from 'vue'
import Child from "@/components/Child";

export default {
  name: 'App',
  components: {Child},
  setup(){
    let car=reactive({name:'奔驰',price:'40w'})

    provide('car',car)


    return{
      ...toRefs(car)
    }
  },
}
</script>

<style scoped>
.app{
  background-color: gray;
  padding: 10px;
}
</style>
